package com.iengoo.inductionms.service.impl;

import com.iengoo.inductionms.entity.Token;
import com.iengoo.inductionms.mapper.TokenMapper;
import com.iengoo.inductionms.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author zpym
 * @CopyRight (C) http://www.iengoo.com
 * @brief
 * @email 122162005@qq.com
 * @date 2019-03-25 22:21
 */
@Service
public class TokenServiceImpl implements TokenService {
    @Autowired
    private TokenMapper tokenMapper;

    public void insert(String token) {
        tokenMapper.insert(token);
    }

    @Override
    public void delete(String token) {
        tokenMapper.delete(token);
    }

    @Override
    public Token findByToken(String token) {
        return tokenMapper.findByToken(token);
    }
}
